home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / p / pov / povlisti.ngs / flyrod3.pov < prev    next >
Encoding:
Text File  |  1992-05-20  |  14.9 KB  |  428 lines

  1. // Persistence of Vision Raytracer
  2. // Flyrod & flyreel by Dan Farmer  May '92
  3. // 5 hours 17 min on 33/486 +a0.1 640x480
  4. #include "include.inc"
  5. #declare Bamboo1 = colour  red   1.00 green   0.78 blue   0.46
  6. #declare Bamboo2 = colour  red   0.97 green   0.82 blue   0.47
  7.  
  8. #declare Reel_Texture = texture {
  9.     0.1
  10.     Shiny
  11.     color Gray50
  12. }
  13.  
  14. #declare Nickle_Silver = texture {
  15.     0.25
  16.     Metal
  17.     color red 0.94 green 0.93 blue 0.83
  18. }
  19.  
  20.  
  21. #declare Cork = texture {
  22.     0.05
  23.     granite
  24.     colour_map {
  25.         [0.0 0.6  colour red 0.93 green 0.71 blue 0.532
  26.                   colour red 0.98 green 0.81 blue 0.60]
  27.         [0.6 0.65 colour red 0.50 green 0.30 blue 0.20
  28.                   colour red 0.50 green 0.30 blue 0.20]
  29.         [0.65 1.0 colour red 0.80 green 0.53 blue 0.46
  30.                   colour red 0.85 green 0.75 blue 0.35]
  31.     }
  32.     scale <0.25 0.25 0.25>
  33.     specular 0.1 roughness 0.5 // Very dull
  34.     ambient 0.1
  35.     diffuse 0.5
  36. }
  37.  
  38. #declare RoseWood = texture {
  39.     DMFWood3
  40.     rotate <0 875 0>              // For x cylinder on reelseat (almost 90)
  41.     ambient 0.3
  42.     specular 0.85 roughness 0.005
  43. }
  44.  
  45. // Torus, Outer 2.23, inner 2.075.
  46. // Used as beaded rim on flyreel frame
  47. #declare Split_Torus =
  48.     intersection {
  49.         quartic {
  50.            <    1.000000 0.000000 0.000000 0.000000 2.000000
  51.                 0.000000 0.000000 2.000000 0.000000 -9.368125
  52.                 0.000000 0.000000 0.000000 0.000000 0.000000
  53.                 0.000000 0.000000 0.000000 0.000000 0.000000
  54.                 1.000000 0.000000 0.000000 2.000000 0.000000
  55.                 9.337500 0.000000 0.000000 0.000000 0.000000
  56.                 1.000000 0.000000 -9.368125 0.000000 21.797227
  57.             >
  58.         }
  59.     plane {<0 1 0> 0}
  60.     rotate <90 0 0>
  61. }
  62.  
  63.  
  64.  
  65. // Closeup view of the reel set and reel
  66. camera {
  67.    location <-18.0  2  -20>
  68.    direction <0.0 0.0  3.0>
  69.    up  <0.0  1.0  0.0>
  70.    right <1.33333 0.0 0.0>
  71.    look_at <-6 -2 0>
  72. }
  73.  
  74. object { light_source  { <-2  30 -20>  color White  } }
  75. object { light_source  { < -20 5 -5>  color Gray75  } }
  76. object { sphere {<0 0 0> 10000 } texture {0.035 color DimGray ambient 1 diffuse 0} }
  77.  
  78. // Reflecting plane for metal textures
  79. object { plane { <0 0 1> -500 } texture { color White ambient 1 } }
  80.  
  81. #declare FlyRod = composite {
  82.  
  83.     // Cork flyrod handle
  84.     object {
  85.         union {
  86.             intersection { X_Disk }
  87.             quadric { Ellipsoid translate <1 0 0> }
  88.         }
  89.         color Red
  90.         texture { Cork scale <2 1 1> }
  91.         scale <5 1 1>
  92.     }
  93.  
  94.     // Reelseat
  95.     object {
  96.         intersection { X_Disk scale <2 0.75 0.75> translate <-7 0 0> }
  97.         color Orange
  98.         texture { RoseWood
  99.             DMFWood3
  100.             rotate <0 90 0>
  101.             ambient 0.25
  102.             specular 0.85 roughness 0.005
  103.         }
  104.     }
  105.  
  106.     // Metal Cap and band for end of reelseat
  107.     object {
  108.         union {
  109.             intersection { X_Disk scale <0.5 0.78 0.76> translate <-9.5 0 0> } // Cap
  110.             intersection { X_Disk scale <0.05 0.82 0.82> translate <-9.05 0 0> }
  111.             quadric { Ellipsoid   scale <0.20 0.80 0.80> translate <-10 0 0> }
  112.  
  113.             intersection { X_Disk scale <0.05 0.82 0.82> translate <-6.7 0 0> } // Band
  114.             intersection { X_Disk scale <0.25 0.78 0.76> translate <-6.5 0 0> } // Band
  115.             intersection { X_Disk scale <0.05 0.82 0.82> translate <-6.3 0 0> } // Band
  116.         }
  117.         color Yellow
  118.         texture {
  119.             Nickle_Silver
  120.         }
  121.     }
  122.  
  123.  
  124.     object {
  125.         // Bamboo flyrod (sorry, it's not tapered)
  126.         intersection { Hexagon
  127.             rotate <30 0 0>
  128.         }
  129.         color Green
  130.         texture {
  131.             Glossy
  132.             gradient <1 0 0>
  133.             color_map {
  134.                 [0.0 0.02 color green 0.35 color green 0.35]
  135.                 [0.02 0.03 color Yellow color Yellow]
  136.                 [0.03 0.07 color green 0.35 color green 0.35]
  137.                 [0.07 0.08 color Yellow color Yellow]
  138.                 [0.08 0.1 color green 0.35 color green 0.35]
  139.                 [0.1 1.0 color Bamboo1 color Bamboo2]
  140.             }
  141.             scale <0.1 1 1>
  142.             translate <-1 0 0>
  143.         }
  144.  
  145.  
  146. /* ----------
  147.         // Graphite flyrod (tapered)
  148.         union {
  149.             intersection { HalfCone_Y
  150.                 rotate <0 0 -90>
  151.             }
  152.         }
  153.         color Green
  154.         texture {
  155.             Glossy
  156.             gradient <1 0 0>
  157.             color_map {
  158.                 [0.0 0.02 color Red color Red]
  159.                 [0.02 0.03 color Black color Black]
  160.                 [0.03 0.07 color Red color Red]
  161.                 [0.07 0.08 color Black color Black]
  162.                 [0.08 0.1 color Red color Red]
  163.                 [0.1 1.0 color Gray50 color Gray50]
  164.             }
  165.             scale <0.1 1 1>
  166.             translate <-1 0 0>
  167.         }
  168. ----------------*/
  169.         scale <100 0.25 0.25>
  170.         translate <110 0 0>
  171.     }
  172.  
  173. }    // end of flyrod composite
  174.  
  175.  
  176. // A round headed screw.  I tried using a gradient for the slot, but
  177. // this looks *much* better.
  178. #declare Screw = difference {
  179.         quadric { Ellipsoid }
  180.         box { UnitBox scale <1 0.1 1> translate <0 0 -1>}
  181.         scale <1 1 0.2>       // Scale to unit proportions
  182.         scale <.05 .05 .05>     // Now, rescale to *useable* proportions
  183.  
  184. }
  185.  
  186. // This is the reel release lever
  187. #declare Release = union {
  188.         box { UnitBox scale <0.15 0.0875 0.015> }
  189.         intersection { Z_Disk scale <0.0875 0.0875 0.015> translate <-0.15 0 0>}
  190.         translate <-0.15 0 0>    // Right edge at x=0
  191. }
  192.  
  193. #declare UL_Brace_Corner = difference {
  194.     box { UnitBox}
  195.     quadric {Cylinder_X scale <1 2.35 2.35> translate <0 1 1>}
  196.     scale <0.075 0.25 0.25 >
  197. }
  198. #declare UR_Brace_Corner = difference {
  199.     box { UnitBox}
  200.     quadric {Cylinder_X scale <1 2.35 2.35> translate <0 1 -1>}
  201.     scale <0.075 0.25 0.25 >
  202. }
  203. #declare LL_Brace_Corner = difference {
  204.     box { UnitBox}
  205.     quadric {Cylinder_X scale <1 2.35 2.35> translate <0 -1 1>}
  206.     scale <0.075 0.25 0.25 >
  207. }
  208. #declare LR_Brace_Corner = difference {
  209.     box { UnitBox}
  210.     quadric {Cylinder_X scale <1 2.35 2.35> translate <0 -1 -1>}
  211.     scale <0.075 0.25 0.25 >
  212. }
  213.  
  214. #declare Brace =  union {
  215.         box { UnitBox scale <0.075 0.075 0.85 > }
  216.         difference { UL_Brace_Corner translate <0  0.325 -0.6>}
  217.         difference { LL_Brace_Corner translate <0 -0.325 -0.6>}
  218.         difference { UR_Brace_Corner translate <0  0.325 +0.6>}
  219.         difference { LR_Brace_Corner translate <0 -0.325 +0.6>}
  220.     }
  221.  
  222. #declare Reel = composite {
  223.  
  224.     // Flyline (off the reel)
  225.     object {
  226.         intersection { X_Disk
  227.             scale <100 0.075 0.075>
  228.         }
  229.         texture { color White }
  230.         translate <100 -2 0>
  231.         rotate <0 0 5>
  232.     }
  233.  
  234.  
  235.  
  236.     // Inner spool w/line on it
  237.     // This is simply a Z_Disk with separate textures on each part.
  238.     // The gradients are to simulate the flyline
  239.     object {
  240.         intersection {
  241.             quadric { Cylinder_Z
  242.                 texture {
  243.                     gradient <0 0 1>
  244.                     color_map {
  245.                         [0.0  0.25 color DimGray color White]
  246.                         [0.25 0.75 color White color White]
  247.                         [0.75  1.0 color White  color DimGray  ]
  248.                     }
  249.                     scale <1 1 0.1 >
  250.                     ambient 0.3
  251.                 }
  252.             }
  253.             plane { <0 0 1> -1 inverse
  254.                 texture {
  255.                     wood
  256.                     turbulence 0
  257.                     color_map {
  258.                         [0.0  0.25 color DimGray color White]
  259.                         [0.25 0.75 color White color White]
  260.                         [0.75  1.0 color White  color DimGray  ]
  261.                     }
  262.                     scale <0.1 0.1 1 >
  263.                     ambient 0.3
  264.                 }
  265.             }
  266.  
  267.             plane { <0 0 1>  1
  268.                 texture {
  269.                     wood
  270.                     turbulence 0
  271.                     color_map {
  272.                         [0.0  0.25 color DimGray color White]
  273.                         [0.25 0.75 color White color White]
  274.                         [0.75  1.0 color White  color DimGray  ]
  275.                     }
  276.                     scale <0.1 0.1 1 >
  277.                     ambient 0.3
  278.                 }
  279.             }
  280.         }
  281.         color Blue
  282.         scale <1.65 1.65 1>
  283.     }
  284.  
  285.     // Flanges
  286.     object {
  287.         difference {
  288.             difference {
  289.                 union {
  290.                     intersection { Z_Disk scale <2 2 0.15> translate <0 0 -1> }
  291.                     intersection { Z_Disk scale <2 2 0.15> translate <0 0  1> }
  292.                 }
  293.                 union {
  294.                     intersection { Z_Disk scale <1.95 1.95 0.075> translate <0 0 -1.15> }
  295.                     intersection { Z_Disk scale <1.95 1.95 0.075> translate <0 0  1.15> }
  296.                 }
  297.             }
  298.             union {
  299.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> }
  300.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0  22.5>}
  301.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0  45>}
  302.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0  67.5>}
  303.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0  90>}
  304.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 112.5>}
  305.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 135>}
  306.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 157.5>}
  307.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 180>}
  308.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 202.5>}
  309.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 225>}
  310.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 247.5>}
  311.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 270>}
  312.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 292.5>}
  313.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 315>}
  314.                 quadric { Cylinder_Z scale <0.2 0.2 1> translate <0 1.5 0> rotate <0 0 337.5>}
  315.  
  316.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> }
  317.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0  22.5>}
  318.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0  45>}
  319.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0  67.5>}
  320.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0  90>}
  321.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 112.5>}
  322.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 135>}
  323.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 157.5>}
  324.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 180>}
  325.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 202.5>}
  326.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 225>}
  327.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 247.5>}
  328.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 270>}
  329.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 292.5>}
  330.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 315>}
  331.                 quadric { Cylinder_Z scale <0.125 0.125 1> translate <0 1 0> rotate <0 0 337.5>}
  332.             }
  333.         }
  334.         bounded_by { intersection { Z_Disk scale <2.1 2.1 1.2> } }
  335.         color Cyan
  336.         texture { Reel_Texture }
  337.     }
  338.  
  339.     // Handle
  340.     object {
  341.         union {
  342.             intersection { Z_Disk scale <0.2 0.2 0.5>
  343.                 translate <0 1.5 -1.5>
  344.                 rotate <0 0 22.5>
  345.             }
  346.             // Button on the end of the handle
  347.             quadric { Ellipsoid  scale <0.15 0.15 0.025>
  348.                 translate <0 1.5 -2>
  349.                 rotate <0 0 22.5>
  350.                 texture { Nickle_Silver }
  351.             }
  352.         }
  353.         color Magenta
  354.         texture { Shiny color Black }
  355.     } // end of handle
  356.  
  357.  
  358.     // Hub cap
  359.     object {
  360.         union {
  361.             intersection { Z_Disk scale <0.35 0.35 0.1>  }
  362.             quadric { Ellipsoid scale <0.25 0.25 0.15> }
  363.             union { Release translate <-0.25 0 0>}
  364.             union {
  365.                 difference { Screw translate < 0.25 0 -0.1> }
  366.                 difference { Screw translate <-0.25 0 -0.1> }
  367.                 rotate <0 0 60>
  368.             }
  369.         }
  370.         bounded_by { sphere { <0 0 0> 0.75 } }
  371.         translate <0 0 -1.1>
  372.         texture { Nickle_Silver }
  373.     } // end of hub cap
  374.  
  375.     // Reel Frame
  376.     object {
  377.         union {
  378.             difference {
  379.                 union {
  380.                     intersection { Z_Disk scale <2.25 2.25 0.15> translate <0 0 -1> }
  381.                     intersection { Z_Disk scale <2.25 2.25 0.15> translate <0 0  1> }
  382.                 }
  383.                 union {
  384.                     quadric { Cylinder_Z scale <2.075 2.075 1> }
  385.                     quadric { Cylinder_Z scale <2.075 2.075 1> }
  386.                 }
  387.             }
  388.             // Crossbars
  389.             union { Brace translate < 2.1725 0 0> }
  390.             union { Brace rotate <0 0 90> translate <0 -2.1725 0> }
  391.             union { Brace translate <-2.1725 0 0> }
  392.             // Beaded rim
  393.             intersection { Split_Torus translate <0 0 -1.15>}
  394.             intersection { Split_Torus rotate <180 0 0> translate <0 0 +1.15>}
  395.         }
  396.         color Red
  397.         texture { Reel_Texture }
  398.         bounded_by { intersection { Z_Disk scale <2.4 2.4 1.21> } }
  399.     } // end of reel frame
  400.  
  401.     // Reel Foot
  402.     object {
  403.         union {
  404.             intersection {
  405.                 difference {
  406.                     intersection {X_Disk scale <1.75 0.77 0.77> }
  407.                     intersection {X_Disk scale <1.85 0.75 0.75> }
  408.                 }
  409.                 plane { <0 1 0> -0.40 }
  410.                 quadric { Cylinder_Y scale <1.75 0.75 1>}
  411.             }
  412.             box { UnitBox scale <0.5 0.075 0.50> translate <0 -0.825 0> }
  413.             box { UnitBox scale <0.25 0.075 0.85> translate <0 -0.975 0> color Green }
  414.         }
  415.         color Orange
  416.         texture { Reel_Texture }
  417.         bounded_by {
  418.             box { UnitBox scale <1.85 1 0.85> }
  419.         }
  420.         translate <0 2.77 0>
  421.     }  // end of reel foot
  422. }
  423.  
  424. composite {
  425.     composite {Reel translate <-8 -2.75  0> }
  426.     composite {FlyRod}
  427. }
  428.